package com.yuexun.beilunpatient.ui.consult.model.impl;


import com.yuexun.beilunpatient.ui.consult.api.HelpApi;
import com.yuexun.beilunpatient.ui.consult.bean.MailFileBean;
import com.yuexun.beilunpatient.ui.consult.model.IHelpModel;
import com.yuexun.beilunpatient.utils.ApiUtil;

import java.util.Map;

import rx.Observable;

/**
 * Created by Administrator on 2017/3/31 0031.
 */

public class HelpModel implements IHelpModel {

    HelpApi api;

    public HelpApi ApiInstance() {
        if (api != null) {
            return api;
        } else {
            return ApiUtil.getInstance().createRetrofitApi(HelpApi.class);
        }
    }

    @Override
    public Observable<MailFileBean> getFileData(Map<String, String> praise) {
        api = ApiInstance();
        return api.getFileDate(praise);
    }
}
